# -*- coding:utf-8 -*-
from flask import request, jsonify, abort
from flask_cors import CORS
from com.zzh.dao_v2.viewCityDao import ViewCityDao

from . import app

CORS(app, supports_credentials=True)


@app.route('/find_view_city', methods=['GET'])
def find_view_city():
    """
    查询 view_area
    :return:
    """
    info = ViewCityDao().findInfo()
    if info:
        return jsonify({"info": info, "message": {"code": 1, "status": "success"}})
    else:
        return jsonify({"message": {"code": 0, "status": "error"}})
